﻿using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.login
{
    //进入房间结果信息
    public class JoinRoomRet : Message
    {
        public static int TYPE = 7;
        public static int ID = 7;

        public bool result { get; set; }

        public void decode(Input _in)
        {
            result = _in.readBoolean();
        }

        public void encode(Output _out)
        {
            _out.writeBoolean(result);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "JoinRoomRet [Result=" + result + ", ]";
        }

        public static JoinRoomRet create(bool result)
        {
            var joinRoomRet = new JoinRoomRet();
            joinRoomRet.result = result;
            return joinRoomRet;
        }
    }
}